import 'package:better_player_plus/better_player_plus.dart';
import 'package:flutter/material.dart';
import 'package:get/get.dart';

import 'video_player_controller.dart';

class VideoPlayer extends StatelessWidget {
  final VideoPlayerController controller = Get.put(VideoPlayerController());

  VideoPlayer({super.key});

  @override
  Widget build(BuildContext context) {
    return Scaffold(
      appBar: AppBar(
        title: Text("Video Player"),
      ),
      body: Column(
        children: [
          const SizedBox(height: 8),
          AspectRatio(
            aspectRatio: 16 / 9,
            child: BetterPlayer.network(
              "http://192.168.1.8:9001/test.mp4",
              betterPlayerConfiguration: BetterPlayerConfiguration(),
            ),
          ),
        ],
      ),
    );
  }
}